<%= render :partial => 'left_bar', :locals => { :on => 1 } %>
<div id="main">
	<div class="box">
			<div class="box" id="period">
				
				<table class="border table">
				  <tr>
				    <th>春季热卖</th>
				  </tr>
				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				    <td>大图：
				    <% top_items = RecommendItem.filter(-1)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="period[]" value="<%= item.related_id %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 6 %>
						  <% (6 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="period[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />

				    </td>
				  </tr>
				  <input type="hidden" name="flag" value="-1">  				  
				  <input type="hidden" name="recommend_type" value="-1">
				  </form>
				  <tr><td>&nbsp;</td></tr>
				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				    <td>小图：
				    <% top_items = RecommendItem.filter(-2)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="period[]" value="<%= item.related_id %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 5 %>
						  <% (5 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="period[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />
				    </td>
				  </tr>
					<tr><td>&nbsp;</td></tr>
				  <input type="hidden" name="flag" value="">  
				  <input type="hidden" name="recommend_type" value="2">
				  </form>
				  
				</table>
			</div>
			
				<div class="box" id="period">
				<table class="border table">
				  <tr>
				    <th>特价商品</th>
				  </tr>
				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				  	<td>
				    <% top_items = RecommendItem.period(1).filter(3)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="period[]" value="<%= item.related_id %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 6 %>
						  <% (6 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="period[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />

				    </td>
				  </tr>
				  <input type="hidden" name="flag" value="1">      
				  <input type="hidden" name="recommend_type" value="3">
				  </form>
				  <tr><td>&nbsp;</td></tr>

				</table>
			</div>
			
			<div class="box" id="period">
				<table class="border table">
				  <tr>
				    <th>女装</th>
				  </tr>
				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				    <td>热卖单品：
				    <% top_items = RecommendItem.period(1).filter(1)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="period[]" value="<%= item.related_id %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 16 %>
						  <% (16 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="period[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />

				    </td>
				  </tr>
				  <input type="hidden" name="flag" value="1">      
				  <input type="hidden" name="recommend_type" value="1">
				  </form>
				  <tr><td>&nbsp;</td></tr>

				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				    <td>搜索热榜：
				    <% top_items = RecommendItem.period(2).filter(1)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="hot_keyword[]" value="<%= item.hot_keyword %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 8 %>
						  <% (8 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="hot_keyword[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />

				    </td>
				    </td>
				  </tr>
				  <input type="hidden" name="flag" value="2">  
				  <input type="hidden" name="recommend_type" value="1">

				  </form>
				</table>
			</div>
			
			<table class="border table">
				  <tr>
				    <th>女裤</th>
				  </tr>
				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				    <td>热卖单品：
				    <% top_items = RecommendItem.period(1).filter(2)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="period[]" value="<%= item.related_id %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 16 %>
						  <% (16 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="period[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />

				    </td>
				  </tr>
				  <input type="hidden" name="flag" value="1">      
				  <input type="hidden" name="recommend_type" value="2">
				  </form>
				  <tr><td>&nbsp;</td></tr>
				  <%= form_tag({:action => 'create'}) -%>
				  <tr>
				    <td>搜索热榜：
				    <% top_items = RecommendItem.period(2).filter(2)%>       
				  	<% top_items.each do |item|%>  
							<input style="width:100px" type="text" name="hot_keyword[]" value="<%= item.hot_keyword %>" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<% end %>
						<% if top_items.length < 8 %>
						  <% (8 - top_items.length).times { |i| %>
						<input style="width:100px" type="text" name="hot_keyword[]" value="" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						  <% } %>
						<% end %>
				    <input class="submit btt90 bttb" name="" type="submit" value="确定" />

				    </td>
				    </td>
				  </tr>

				  <input type="hidden" name="flag" value="2">  
				  <input type="hidden" name="recommend_type" value="2">
				  </form>
				</table>
			</div>
	</div>
</div>
